home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
ppfont10
/
ppfont.txt
< prev
next >
Wrap
Text File
|
1993-04-24
|
4KB
|
142 lines
#define LF_FACESIZE 32
#define LF_FULLFACESIZE 64
#define RASTER_FONTTYPE 0x0001
#define DEVICE_FONTTYPE 0X0002
#define TRUETYPE_FONTTYPE 0x0004
typedef struct tagLOGFONT
{
int lfHeight;
int lfWidth;
int lfEscapement;
int lfOrientation;
int lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
char lfFaceName[LF_FACESIZE];
} LOGFONT;
/* Structure passed to FONTENUMPROC */
typedef struct tagENUMLOGFONT
{
LOGFONT elfLogFont;
char elfFullName[LF_FULLFACESIZE];
char elfStyle[LF_FACESIZE];
} ENUMLOGFONT, FAR* LPENUMLOGFONT;
/* weight values */
#define FW_DONTCARE 0
#define FW_THIN 100
#define FW_EXTRALIGHT 200
#define FW_LIGHT 300
#define FW_NORMAL 400
#define FW_MEDIUM 500
#define FW_SEMIBOLD 600
#define FW_BOLD 700
#define FW_EXTRABOLD 800
#define FW_HEAVY 900
#define FW_ULTRALIGHT FW_EXTRALIGHT
#define FW_REGULAR FW_NORMAL
#define FW_DEMIBOLD FW_SEMIBOLD
#define FW_ULTRABOLD FW_EXTRABOLD
#define FW_BLACK FW_HEAVY
/* CharSet values */
#define ANSI_CHARSET 0
#define DEFAULT_CHARSET 1
#define SYMBOL_CHARSET 2
#define SHIFTJIS_CHARSET 128
#define HANGEUL_CHARSET 129
#define CHINESEBIG5_CHARSET 136
#define OEM_CHARSET 255
/* OutPrecision values */
#define OUT_DEFAULT_PRECIS 0
#define OUT_STRING_PRECIS 1
#define OUT_CHARACTER_PRECIS 2
#define OUT_STROKE_PRECIS 3
#if (WINVER >= 0x030a)
#define OUT_TT_PRECIS 4
#define OUT_DEVICE_PRECIS 5
#define OUT_RASTER_PRECIS 6
#define OUT_TT_ONLY_PRECIS 7
#endif /* WINVER >= 0x030a */
/* ClipPrecision values */
#define CLIP_DEFAULT_PRECIS 0x00
#define CLIP_CHARACTER_PRECIS 0x01
#define CLIP_STROKE_PRECIS 0x02
#define CLIP_MASK 0x0F
#if (WINVER >= 0x030a)
#define CLIP_LH_ANGLES 0x10
#define CLIP_TT_ALWAYS 0x20
#define CLIP_EMBEDDED 0x80
#endif /* WINVER >= 0x030a */
/* Quality values */
#define DEFAULT_QUALITY 0
#define DRAFT_QUALITY 1
#define PROOF_QUALITY 2
/* PitchAndFamily pitch values (low 4 bits) */
#define DEFAULT_PITCH 0x00
#define FIXED_PITCH 0x01
#define VARIABLE_PITCH 0x02
/* PitchAndFamily family values (high 4 bits) */
#define FF_DONTCARE 0x00
#define FF_ROMAN 0x10
#define FF_SWISS 0x20
#define FF_MODERN 0x30
#define FF_SCRIPT 0x40
#define FF_DECORATIVE 0x50
//------------------------------------------------------------------
/* Structure passed to FONTENUMPROC */
/* NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields */
typedef struct tagNEWTEXTMETRIC
{
int tmHeight;
int tmAscent;
int tmDescent;
int tmInternalLeading;
int tmExternalLeading;
int tmAveCharWidth;
int tmMaxCharWidth;
int tmWeight;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmFirstChar;
BYTE tmLastChar;
BYTE tmDefaultChar;
BYTE tmBreakChar;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
int tmOverhang;
int tmDigitizedAspectX;
int tmDigitizedAspectY;
DWORD ntmFlags;
UINT ntmSizeEM;
UINT ntmCellHeight;
UINT ntmAvgWidth;
} NEWTEXTMETRIC;
typedef NEWTEXTMETRIC FAR* LPNEWTEXTMETRIC;
/* ntmFlags field flags */
#define NTM_REGULAR 0x00000040L
#define NTM_BOLD 0x00000020L
#define NTM_ITALIC 0x00000001L
#define LF_FULLFACESIZE 64